<script>
	import { mapMutations } from 'vuex'
	export default {
		onLaunch: function() {
			this.getUserData()
		},
		onShow: function() {

		},
		onHide: function() {

		},
		methods: {
			// 获取用户信息
			getUserData () {
				let userName = uni.getStorageSync('userData').data
				let userIdentity = uni.getStorageSync('userIdentity')
				userIdentity && this.SET_IDENTITY(userIdentity)
				userName && this.SET_USERNAME(userName)
			},
			...mapMutations(['SET_USERNAME','SET_IDENTITY'])
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
